package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.StrategyTheme;
import cn.wolfcode.luowowo.article.mapper.StrategyThemeMapper;
import cn.wolfcode.luowowo.article.service.IStrategyThemeService;
import cn.wolfcode.luowowo.common.query.QueryObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class StrategyThemeServiceImpl implements IStrategyThemeService {

    @Autowired
    private StrategyThemeMapper strategyTagMapper;

    @Override
    public void deleteByPrimaryKey(Long id) {

    }

    @Override
    public void insert(StrategyTheme record) {
        strategyTagMapper.insert(record);
    }

    @Override
    public StrategyTheme selectByPrimaryKey(Long id) {
        return strategyTagMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<StrategyTheme> selectAll() {
        return strategyTagMapper.selectAll();
    }

    @Override
    public PageInfo<StrategyTheme> queryForList(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<StrategyTheme> list = strategyTagMapper.queryForList(qo);
        return new PageInfo(list);
    }

    @Override
    public void updateByPrimaryKey(StrategyTheme record) {
        strategyTagMapper.updateByPrimaryKey(record);
    }
}
